#include <iostream>
#include <string>

using namespace std;

class Date {
   public:
    Date();
    Date(int year, int month, int day);
    int getYear();
    void setYear(int year);
    int getMonth();
    int getDay();
    void setMonth(int month);
    void setDay(int day);
    void Print();

   private:
    int year;
    int month;
    int day;
};

Date::Date() {
    year = month = day = 0;
}
Date::Date(int year, int month, int day) {
    this->year = year;
    this->month = month;
    this->day = day;
}
int Date::getYear() {
    return year;
}
void Date::setYear(int y) {
    year = y;
}
int Date::getMonth() {
    return month;
}
int Date::getDay() {
    return day;
}
void Date::setMonth(int m) {
    month = m;
}
void Date::setDay(int d) {
    day = d;
}
void Date::Print() {
    cout << year << " " << month << " " << day << endl;
}

class Person {
   public:
    Person(int id, int year, int month, int day);
    ~Person();
    int getId();
    Date getBirthDate() const;
    void setBirthDateYear(int);
    static int getNumberOfObjects();  // return the number of Person objects
   private:
    int id;
    Date birthDate;
    static int numberOfObjects;  // count the number of Person objects
};

int Person::numberOfObjects = 0;

Person::Person(int id, int year, int month, int day) {
    this->id = id;
    birthDate = Date(year, month, day);
    numberOfObjects++;
}
Person::~Person() {
    numberOfObjects--;
}
int Person::getId() {
    return id;
}
Date Person::getBirthDate() const {
    return birthDate;
}
void Person::setBirthDateYear(int year) {
    birthDate.setYear(year);
}
int Person::getNumberOfObjects() {
    return numberOfObjects;
}  // return the number of Person objects